<!-- <template>
  <div style="background:#2b76f6;">
    <div class="configuration">
      <img src="@/assets/images/exit.png" alt="" @click="next" class="exit">
  </div>
  <div class="content">
    <div class="title">入连人员信息采集</div>
    <div class="title fs">RULIANRENYUANXINXICAIJI</div>
      <div class="btn" @click="goHome()">备案登记</div>
      <div class="btn" @click="goDetail()" style="background:#f4af4d;">登记列表</div>

    </div>
  </div>
</template>

<script>
import { Toast } from 'vant'
export default {
  data () {
    return {
    }
  },
  mounted () {
    if (!localStorage.getItem('k')) return this.$router.push('/')
  },
  methods: {
    goHome () {
      // 入连类型 1境外 2域外 3火车 4港口 5客运 6交通卡口
      if (localStorage.getItem('k') === '境外管理人员') return this.$router.push({ name: 'jwhome', query: { id: 1 } })
      if (localStorage.getItem('k') === '域外管理人员') return this.$router.push({ name: 'ywhome', query: { id: 2 } })
      if (localStorage.getItem('k') === '火车站管理人员') return this.$router.push({ name: 'hczhome', query: { id: 3 } })
      if (localStorage.getItem('k') === '港口管理人员') return this.$router.push({ name: 'gkhome', query: { id: 4 } })
      if (localStorage.getItem('k') === '客运站管理人员') return this.$router.push({ name: 'kyzhome', query: { id: 5 } })
      if (localStorage.getItem('k') === '交通卡口管理人员') return this.$router.push({ name: 'jtkkhome', query: { id: 6 } })
      Toast('此角色没有权限')
    },
    goDetail () {
      if (localStorage.getItem('k') === '境外管理人员') return this.$router.push({ name: 'jwdetail', query: { id: 1 } })
      if (localStorage.getItem('k') === '域外管理人员') return this.$router.push({ name: 'ywdetail', query: { id: 2 } })
      if (localStorage.getItem('k') === '火车站管理人员') return this.$router.push({ name: 'hczdetail', query: { id: 3 } })
      if (localStorage.getItem('k') === '港口管理人员') return this.$router.push({ name: 'gkdetail', query: { id: 4 } })
      if (localStorage.getItem('k') === '客运站管理人员') return this.$router.push({ name: 'kyzdetail', query: { id: 5 } })
      if (localStorage.getItem('k') === '交通卡口管理人员') return this.$router.push({ name: 'jtkkdetail', query: { id: 6 } })
      Toast('此角色没有权限')
    },
    next () {
      localStorage.removeItem('k')
      this.$router.push('/')
    }
  }
}
</script>
<style lang="less" scoped>
.configuration{
  background: url('../../assets/images/t-b.png')no-repeat;
  background-size: 100% 100%;
  height:  30vh;
}
.content{
    background: white;
    height: calc(60vh - 80px);
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    overflow: hidden;
    padding: 40px;
    .btn{
      height: 200px;
      background: #408cf7;
      border-radius: 20px;
      display: flex;
      justify-content: center;
      align-items: center;
      color: white;
      margin-bottom: 30px;
    }
    .title{
      font-family: "Source Han Sans CN Bold";
      font-weight: bold;
      font-size: 55px;
      text-align: left;
      color: #0042b0;
      text-shadow: 0 3px 6px rgba(0, 0, 0, 0.16);
      text-align: center;
    }
    .fs{
      font-size: 28px;
      margin-bottom: 100px;
    }
  }
/deep/.van-button--block{
    padding: 60px!important;
  }
  .exit{
    width: 80px;
    height: 80px;
    display: flex;
    position: absolute;
    right: 40px;
    top: 40px;
  }
</style> -->
<template>
  <div style="background:#2b76f6;">
    <div class="configuration">
      <van-button style="float:right;" @click="signOut()" color="linear-gradient(to right, #ff6034, #ee0a24)">
        退出
      </van-button>
    </div>
    <div class="content">
      <div class="title">社区人员信息采集</div>
      <div class="title fs">SHEQURENYUANXINXICAIJI</div>
      <!-- <div class="btn" @click="goHome(1)">备案登记</div> -->
      <!-- <div class="btn" @click="goHome(2)" style="background:#f4af4d;">管控登记</div> -->
      <div class="btn" @click="goHome(3)" style="background:rgb(91 62 21);">社区登记</div>

    </div>
  </div>
</template>

<script>
import router from '../../router/index'
export default {
  data () {
    return {
    }
  },
  methods: {
    goHome (i) {
      let username = localStorage.getItem('username')
      if (username == 'LM40010' || username == 'L00021') {
         // LM40010 火车站
        this.$router.push({ name: 'home2' })
      } else if (username == 'LM40011' || username == 'L00022') {
         // LM40011 社区 
        this.$router.push({ name: 'home3' })
      }
    },
    signOut () {
      localStorage.removeItem('username')
      localStorage.removeItem('k')
      router.push('/')
    }
  }
}
</script>
<style lang="less" scoped>
.configuration {
  background: url('../../assets/images/t-b.png')no-repeat;
  background-size: 100% 100%;
  height: 30vh;
}

.content {
  background: white;
  height: calc(60vh - 80px);
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
  overflow: hidden;
  padding: 40px;

  .btn {
    height: 200px;
    background: #408cf7;
    border-radius: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    margin-bottom: 30px;
  }

  .title {
    font-family: "Source Han Sans CN Bold";
    font-weight: bold;
    font-size: 55px;
    text-align: left;
    color: #0042b0;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.16);
    text-align: center;
  }

  .fs {
    font-size: 28px;
    margin-bottom: 100px;
  }
}

/deep/.van-button--block {
  padding: 60px !important;
}
</style>
